home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / Pascal / OneTest / StdHandlerStubs.p < prev   
Text File  |  1994-10-29  |  2KB  |  62 lines

  1. {Mostly empty stubs for OneEvents. See OneEvents.p for comments. This file is where most of your}
  2. {window/menu/event handling code goes.}
  3.  
  4. unit StdHandlerStubs;
  5.  
  6. interface
  7.  
  8. {$ifc undefined THINK_PASCAL}
  9.     uses
  10.         Types, QuickDraw, Events, Windows, Dialogs, Fonts, DiskInit, TextEdit, Traps, Desk, Memory,{}
  11.         SegLoad, Scrap, ToolUtils, OSEvents, OSUtils, Menus, Resources, StandardFile, GestaltEqu, Files,{}
  12.         Errors; {}
  13. {$endc}
  14.  
  15.     procedure DoUpdate (w: WindowPtr);
  16.     procedure DoClose (w: WindowPtr);
  17.     procedure DoAbout;
  18.     procedure DoMenu (menuID, item: integer);
  19.     procedure DoMouse (where: Point; mods: longint);
  20.     procedure DoKey (theChar: char; mods: longint);
  21.  
  22.     var
  23.         gDone: Boolean;
  24.         gHasCQD: Boolean;    {Initialized by OneInit}
  25.  
  26. implementation
  27.  
  28.     procedure DoUpdate (w: WindowPtr);
  29.     begin
  30. {Handle update events. It is up to you to identify what window it is from the Window Ptr,}
  31. {if you have more than one window.}
  32.         MoveTo(30, 30);
  33.         DrawString('No features,');
  34.         MoveTo(30, 50);
  35.         DrawString('no crash.');
  36.     end;
  37.     procedure DoClose (w: WindowPtr);
  38.     begin
  39. {Click in close box of a window.}
  40.         gDone := true;
  41.     end;
  42.     procedure DoAbout;
  43.     begin
  44. {Show the about box here.}
  45.     end;
  46.     procedure DoMenu (menuID, item: integer);
  47.     begin
  48. {We have only one menu, with only one item, and that is Quit!}
  49. {Usually, this procedure should use case for each menu, and then case}
  50. {for each item.}
  51.         gDone := true;
  52.     end;
  53.     procedure DoMouse (where: Point; mods: longint);
  54.     begin
  55. {Handle mouse downs in window contents.}
  56.     end;
  57.     procedure DoKey (theChar: char; mods: longint);
  58.     begin
  59. {Handle key downs.}
  60.     end;
  61.  
  62. end.